package com.yu.shaungxuan.utils;


import com.yu.shaungxuan.model.entity.Student;
import com.yu.shaungxuan.model.entity.Teacher;

public class TeacherHolder {
    private static final ThreadLocal<Teacher> tl = new ThreadLocal<>();

    public static void saveTeacher(Teacher teacher){
        tl.set(teacher);
    }

    public static Teacher getTeacher(){
        return tl.get();
    }

    public static void removeTeacher(){
        tl.remove();
    }
}
